# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=matahari
pkgver=0.1.30
pkgrel=4
pkgdesc='A reverse HTTP shell to execute commands on remote machines behind firewalls.'
arch=('any')
url='http://matahari.sourceforge.net/'
license=('GPL')
depends=('python2')
groups=('blackarch' 'blackarch-tunnel')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tgz")
sha512sums=('82089cc117c0452eed8de1ce7dbbb56d3042d10de4fd92b3ab593e800ede983f9634cc944d62125c0a33646a5f4b3132d07b5efcd85abae25254563e842eeb20')

prepare() {
  grep -iRl 'python' "$srcdir" |
  xargs sed -i 's|#!.*/usr/bin/python|#!/usr/bin/python2|;s|#!.*/usr/bin/env python$|#!/usr/bin/env python2|'
}

package() {
  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
}

